package com.anlen.sign;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.animation.AlphaAnimation;
import android.view.animation.Animation;
import android.view.animation.Animation.AnimationListener;

public class AppStart extends BaseActivity {
   public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        final View view = View.inflate(this, R.layout.app_start, null);
        setContentView(view);
       
        // 渐变展示启动屏
        AlphaAnimation aa = new AlphaAnimation(0.5f, 1.0f);
        aa.setDuration(2000);
        view.startAnimation(aa);
        aa.setAnimationListener(new AnimationListener() {
            @Override
            public void onAnimationEnd(Animation arg0) {
            	toMain();	
            }

            @Override
            public void onAnimationRepeat(Animation animation) {}

            @Override
            public void onAnimationStart(Animation animation) {}
        });
    }
   
    @Override
    protected void onResume() {
        super.onResume();
       
    }
	   @Override
	protected void onPause() {
		super.onPause();
   } 
    private void toMain(){
    	 Intent intent = new Intent(this, MainActivity.class);
         startActivity(intent);
         finish();
    }

}
